<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Product_Category_Model extends CI_Model
{
    protected $_lang = '';
    protected $_table = 'product_category';
            
    function __construct() {
        parent::__construct();
    }
    
    public function initialise($lang)
    {
        if($lang!=''&&$lang!='vn')
            $this->_lang = '_'.$lang;
        else
            $this->_lang = '';
    }

   function delete(){
          $this->db->where('bl_active',1);
          $query = $this->db->delete('product_category');
          if($query){
              return true;
          }else{
              return false;
          }
    }

    function getMenuCategoryHome(){
        $this->db->where('home',1);
		$this->db->order_by('nb_order','ASC');
        return $this->db->get($this->_table)->result();
    }	
}